<template>
	<view class="header" style="color: #000000;" @tap="goBack(id)">
		<view class="arrow">
		</view>
		<view class="title">
			{{title}}
		</view>
	</view>
</template>

<script>
	export default{
		props: {
			title: {
				type: '',
				required: true
			},
			childId: {
				type: Number,
				required: true
			}
		},
		data() {
			return {
			}
		},
		methods: {
			goBack(id) {
				console.log(id)
				uni.navigateBack({
				    delta: 1
				})
				
				
				
				
				
				// let pages = getCurrentPages(); //获取所有页面栈实例列表
				//    let nowPage = pages[pages.length - 1]; //当前页页面实例
				//    let prevPage = pages[pages.length - 2]; //上一页页面实例
				//    prevPage.$vm.searchVal = childId; //修改上一页data里面的searchVal参数值为1211
				   // uni.navigateBack({
				   //  //uni.navigateTo跳转的返回，默认1为返回上一级
				   //  delta: 1,
				   // });
				
				
				
				
				
				// this.$emit('chuilId',{childId: childId})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.header {
		width: 100%;
		height: 150rpx;
		line-height: 150rpx;
		display: flex;
		align-items: center;
		// padding-left: 10rpx;
		padding-top: 30rpx;
		font-size: 36rpx;
		font-family: PingFang SC;
		font-weight: 500;
		background: #FFFFFF;
		
		.arrow{
		  position: relative;
		  display: inline-block;
		}
		
		.arrow::before{
		  content: '';
		  width: 10px;
		  height: 10px;
		  border: 0px;
		  border-bottom: solid 2px #2C2C2C;
		  border-left: solid 2px #2C2C2C;
		  -ms-transform: rotate(45deg);
		  -webkit-transform: rotate(45deg);
		  transform: rotate(45deg);
		  position: absolute;
		  top: 50%;
		  left: 0;
		  margin-top: -4px;
		  margin-left: 28rpx;
		}
		
		.title {
			margin: 0 auto;
		}
	}
</style>
